// Package _3_twice_search 1-300
// @Title _3_twice_search
// @Description  300. 最长递增子序列
// @Author  == 琳琳也叫王木木 ==  2021/9/15 17:56
// @Create  2021/9/15 17:56
package _3_twice_search

import "fmt"

func LengthOfLIS(nums []int) int {

	return 0
}

// LengthOfLISViolence 暴力解法获取最长递增子序列
func LengthOfLISViolence(nums []int) int {
	ans := 0
	for i := 0; i < len(nums); i++ {
		temp := 0
		target := nums[i]
		for j := i + 1; j < len(nums); j++ {
			if nums[j] >= target {
				temp++
				target = nums[j]
			}
		}
		if temp > ans {
			ans = temp
		}
		fmt.Println(temp)
	}
	return ans
}
